'\" t
.TH mdiff 1 "12 September 2006" "Code Manager II"

.SH NAME
mdiff \- Show file differences

.SH SYNOPSIS
mdiff [\fB--versions\fP \fIX[,Y]\fP] [\fB--sdiff|--cdiff\fP] [\fB--width\fP \fINN\fP]
      [\fB--verbose\fP] file

.SH DESCRIPTION
The \fImdiff(1)\fP utility is used to show differences between versions of the 
same file in the same project. Without any arguments it will show the differences
between the file in question and the latest version under code control. Hence if the
file is not checked out then no differences will be shown. 

Three different output options are available to ensure a suitable format for all
occasions is possible!

.SH ARGUMENTS
.TP 8
.B --verbose
Show more information regarding the version checking process. Particularly
useful if the results are not as you expect - since the version specification
supported can be quite complex.
.TP
.B --sdiff
Generate a side-by-side difference report. This only works if the OS in
question supports the sdiff(1) command and it is in the current path.
.TP
.B --cdiff
Generate a context-difference output. The output includes 5 lines of
context rather than the usual stage of 3. This output is suitable for
patching files if required.
.TP
.B --width
Indicates the width of the output in characters that the side-by-side
difference report uses. It defaults to 130 characters.
.TP
.B --versions
Indicates one or two versions to compare. If only a single version
is specified then the difference between that version and the version
in the working directory are shown.

.SH VERSION SPECIFICATION
If a version needs to be specified it can be done so in a number
of ways including:

.TP 4
.B * Local version numbers
The local version number can be specified directly or 
following the 'LOCAL:' designation. For example all of the below
are local version [depending on the back-end repository type]:

.TS
l.
1
1.21
121
LOCAL:1.2
LOCAL:434
.TE

.TP
.B * SHA1 digital signature
This should be the complete SHA1 reference either directly 
or following the 'SHA1:' designation. Hence the following two
examples are identical:

.TS
l.
7c91fd774dd742ea7921da3cd32f1ecb898ccd89
SHA1:7c91fd774dd742ea7921da3cd32f1ecb898ccd89
.TE

.TP
.B * Tag Reference
To get a version of a file for a specified tag the format
on the command line should be:

.TS
l.
TAG:nameoftag
.TE

.SH EXIT CODES
The \fImdiff(1)\fP follows UNIX standard practise:

.TP 4
.B 0
Details have been successfully returned.
.TP
.B >0
The command encountered an unexpected error.

.SH NOTES
The return codes generated by this utility can not be used to indicate
whether differences have been found, only whether the reporting
of any differences was successful. 

.SH AUTHOR
The \fBCode Manager II\fP tool set was written by Simon Edwards, Proprius Consulting Ltd, (\fBwww.proprius.co.uk\fP).

.SH SEE ALSO
.BR cm2(1),
.BR cm2_mci(1),
.BR cm2_mco(1),
.BR cm2_minfo(1).

.SH AVAILABILITY
This utility was specifically written under the GNU GPL license and as required
by such software comes with \fIno warranty or guarantee of any kind\fP.

